import request from '@/router/axios'

export function getWorkContactList(query) {//获取客户管理列表
    return request({
        url: '/cp/workcontact/new/page',
        method: 'get',
        params: query
    })
}
//获取基本信息
export function basicInfo(obj) {
    return request({
        url: `/cp/workcontact/new/${obj.id}`,
        method: 'get',
        params: {
            custNo: obj.custNo
        }
    })
}
//获取关联信息列表
export function linkInfo(query) {
    return request({
        url: '/cp/workcontact/new/page-employee',
        method: 'get',
        params: query
    })
}
//查询客户互动轨迹
export function synTrack(query) {//查看客户互动轨迹
    return request({
        url: '/cp/workcontact/track',
        method: 'get',
        params: query
    })
}
//同步客户
export function synContact() {
    return request({
        url: '/cp/workcontact/syncontact',
        method: 'put'
    })
}
// export function editSynDetail (obj, query) {//修改客户详情基本信息
//     return request({
//         url: '/cp/workcontact',
//         method: 'put',
//         data: obj,
//         params: query
//     })
// }
//根据客户id修改客户编号
export function editContactNo(obj) {
    return request({
        url: '/cp/workcontact/new/update-contact-num',
        method: 'put',
        data: obj,
    })
}

// 获取客户基础信息-新
export function getCusInfo() {
    return request({
        url: `/cp/workcontact/statistics`,
        method: 'get'
    })
}

// 获取客户趋势
export function tendencyData(data) {
    return request({
        url: `/cp/workcontact/tendency`,
        method: 'get',
        params: data
    })
}